
// 加载项目信息
function loadProjectInfo(projectId) {
    $.ajax({
        url: ctx + "project/info/" + projectId,
        type: "GET",
        success: function(result) {
            if (result.code == 0) {
                $('#projectName').val(result.data.name);
            }
        }
    });
}

// 加载角色列表
function loadRoleList() {
    $.ajax({
        url: ctx + "project/role/list",
        type: "GET",
        success: function(result) {
            if (result.code == 0) {
                var roleSelect = $('#roleId');
                $.each(result.data, function(index, role) {
                    roleSelect.append('<option value="' + role.id + '">' + role.name + '</option>');
                });
            }
        }
    });
}